Modular Session Types for Objects
نویسندگان
چکیده
Session types allow communication protocols to be specified type-theoretically so that protocol implementations can be verified by static type checking. We extend previous work on session types for distributed object-oriented languages in three ways. (1) We attach a session type to a class definition, to specify the possible sequences of method calls. (2) We allow a session type (protocol) implementation to be modularized, i.e. partitioned into separately-callable methods. (3) We treat session-typed communication channels as objects, integrating their session types with the session types of classes. The result is an elegant unification of communication channels and their session types, distributed object-oriented programming, and a form of typestate supporting non-uniform objects, i.e. objects that dynamically change the set of available methods. We define syntax, operational semantics, a sound type system, and a sound and complete type checking algorithm for a small distributed class-based object-oriented language with structural subtyping. Static typing guarantees that both sequences of messages on channels, and sequences of method calls on objects, conform to type-theoretic specifications, thus ensuring type-safety. The language includes expected features of session types, such as delegation, and expected features of object-oriented programming, such as encapsulation of local state.
منابع مشابه
Behavioral Subtyping in Object-Oriented Languages
Modularity and code reuse are two important features of object-oriented programming. Modularity means that adding new components does not require reveri cation or respeci cation of existing components. A common form of reuse in objectoriented programs is to add new subtypes to existing types and to invoke already existing procedures with objects of these new types. In such cases, behavior of pr...
متن کاملTyping the Behavior of Objects and Components using Session Types
This paper describes a proposal for typing the behavior of objects in component models. Most component models, CORBA in particular, do not offer any support for expressing behavioral properties of objects beyond the “static” information provided by IDLs. We build on the works by Honda et al. [6] and Gay and Hole [5] to show how session types can be effectively used for describing protocols, ext...
متن کاملHydroponics Roofs for Saving Energy of Green Schools in the Cold and Dry climate of Iran: A Comparative Study between Two Broad and Modular Hydroponic Green Roofs
Green schools are a new type of school, in which the use of renewable energy is less than that of conventional schools. In this regard, nowadays, adding green layers to the roof of schools, in addition to increasing the Students' communication with nature, energy saving has improved in these spaces. However, to improve energy saving yield, the priority of these types of roofs in different clima...
متن کاملSecure Execution of Distributed Session Programs
The development of the SJ Framework for session-based distributed programming is part of recent and ongoing research into integrating session types and practical, real-world programming languages. SJ programs featuring session types (protocols) are statically checked by the SJ compiler to verify the key property of communication safety, meaning that parties engaged in a session only communicate...
متن کاملEFFICIENT SIMULATION FOR OPTIMIZATION OF TOPOLOGY, SHAPE AND SIZE OF MODULAR TRUSS STRUCTURES
The prevalent strategy in the topology optimization phase is to select a subset of members existing in an excessively connected truss, called Ground Structure, such that the overall weight or cost is minimized. Although finding a good topology significantly reduces the overall cost, excessive growth of the size of topology space combined with existence of varied types of design variables challe...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Logical Methods in Computer Science
دوره 11 شماره
صفحات -
تاریخ انتشار 2011